#define _CRT_SECURE_NO_WARNINGS 1
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
char* func(char** p, int n)
{
	int i = 0;
	int j = 0;
	int t[100] = { 0 };
	for (i = 0; i < n; i++)
	{

		j = 0;
		while (*(p[i] + j) != '\0')
		{
			if (*(p[i] + j) == '*')
			{
				t[i]++;
			}
			j++;
		}

	}
	int max = 0;
	int k = 0;
	for (i = 0; i < n; i++)
	{
		if (max < t[i])
		{
			max = t[i];
			k = i;
		}
	}
	return p[k];
}
void freedom(char** p, int n)
{
	for (int i = 0; i < n; i++)
	{
		free(p[i]);
        p[i]=NULL;
	}
}
int main()
{
	char arr[1000];
	char* p[100];
	int n = 0;
	int i = 0;
	while (scanf("%d ", &n) != EOF)
	{
		for (i = 0; i < n; i++)
		{
			scanf(" %s", arr);
			int len = strlen(arr) + 1;
			p[i] = (char*)malloc(sizeof(char) * len);
			strcpy(p[i], arr);
		}
		printf(func(p, n));
		printf("\n");
		freedom(p, n);
	}
	return 0;
}